import request from '@/utils/request'


export function getSecurity(tenantId) {
  return request({
    url: `/api/security/department?tenantId=${tenantId}`, 
    method: 'get'
  })
}

export function getSecurityCompanyId(departmentId) {
  return request({
    url: `/api/security/department/${departmentId}`, 
    method: 'get'
  })
}

export function postSecurity(data) {
  return request({
    url: '/api/security/department', 
    method: 'post',
    data
  })
}

export function deleteSecurity(departmentId) {
  return request({
    url: `/api/security/department/${departmentId}?departmentId=${departmentId}`,
    method: 'delete'
  })
}

export function putSecurity(departmentId,data) {
  return request({
    url: `/api/security/department/${departmentId}?departmentId=${departmentId}`,
    method: 'put',
    data
  })
}